package com.bw.system.server.config;

import com.alipay.api.AlipayConfig;
import lombok.Data;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@Data
public class ApiPayConfig {
    @Bean
    public AlipayConfig getOptions() {

        String privateKey  = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCj4RAiZ+aRy5P+d5EMS9iyDZkgf1KytXLoGIuvay5lrWiJkCGK3MFo7xv1ygGDg5Opn4r3cLRfKoXKsrDBD5kMbXIJzrbSKl91j+LLzuS2jq2bi/u/VDPL+RPrfBQimuoTYIiAgUj+HUj1faKZO4jgQEiveg2OxT7cbzIPd/LsfRMyPwkPNxRbQCMy260GlxwNh4z4LDCR3LO9+L11xAGGVmSDzgNuD2WKD88FAPm6ORaThRgBj2UyTegb50HtHfCFtAT0cHK8+QCrbv+/xyRpNfE4fpiOQi4Z+oHjgF9px4RZPXSczNAiFsgOEyMW0dT9M2YBbxr8gJ1FRPZ87d+NAgMBAAECggEAekjr6DCNrYcydLS1yG4kUaCx/bzkcbPR/XyrZwdchMSj99pUHTFjJTEfNQY6oO8i1XTWlpNEFKs/UKSMHlPMSai1aroUU7kIqEno21oT8mF/DE2lWfyz9eVzxsk8oSHlvvXOhc1zMSObGIxaM2toVKXDVyWFTl7C7GwQ99fyriHhXrUkBAf3wLV80nFOvjhdNZveRL1osYw66xKchrwIgTOsLLmdQ2aAQgmXvrcIkLR2kG4163ikweIYOrSRqtBv4sild6SdOXQ2045ViPfAlPZoV1AWUnnsYJPOAbx27FMgy+mCAfHS6fvWCFFmMQafW9kK6AQVMTf8C+4+4sFaRQKBgQD/uTPafAjiJV5ucUFUOokLnJba9MmHV3EZWp5Gk7VUpfDpgGjPHSWMyO/6CKiciqRNBd1ESHblwV1LLquf5y/gIfRTG2XGH5aMRT9a+PZAGHdAcDp1P6JEUjOjbhlsDaXP/5zJhXa5eKDtLmZnAo+NlqlK2jWwS3U2b3jNyd5PnwKBgQCkDm7oRnK0ri678a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+GVCkPYrluzQIDAQAB";
        AlipayConfig alipayConfig = new AlipayConfig();
        alipayConfig.setServerUrl("https://openapi-sandbox.dl.alipaydev.com/gateway.do");
        alipayConfig.setAppId("9021000140637135");
        alipayConfig.setPrivateKey(privateKey);
        alipayConfig.setFormat("json");
        alipayConfig.setAlipayPublicKey(alipayPublicKey);
        alipayConfig.setCharset("UTF-8");
        alipayConfig.setSignType("RSA2");
        return alipayConfig;

    }
}
